<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>日记发布</title>

    <!-- Bootstrap -->
    <link href="/static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	
	<!-- 编辑器 -->
	<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
  </head>
  <body>
   <form style='width:1000px;margin:auto;' method='post' action='/home/setDiary' onsubmit="return submits()" enctype="multipart/form-data">
	  <div class="form-group"> 
		<label for="exampleInputPassword1">内容</label>
		<textarea id="editor" style="height:500px;"></textarea>
		<input type='hidden' name='info' id='info'></input>
	  </div>
	  <div class="form-group">
		<label for="exampleInputFile">图片上传</label>
		<input type="file" id='files' name='files'>
	  </div>
	  <button type="submit" class="btn btn-default">提交日记</button>
	</form>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
	<script>
		UE.getEditor('editor');
		function submits(){
			$('#info').val(UE.getEditor('editor').getContent());
alert(1);
			return true;
		}
	</script>
  </body>
</html>
